package com.gugee.ins.data.task.config;


import com.alibaba.nacos.api.config.annotation.NacosValue;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: luolifeng
 * Date: 2020-12-24 16:13
 */
@Component
@Getter
public class TaskConfig {
    /**
     * 库中有效数据的时间范围
     */
    @NacosValue(value="${ins.task.query.latestDays:30}", autoRefreshed = true)
    int latestDays;

    /**
     * 日志打印时间要求
     */
    @NacosValue(value="${ins.task.logTime.debug.limit:120}", autoRefreshed = true)
    long debugTimeLimit;

    /**
     * 消息重发最大次数,=
     */
    @NacosValue(value="${ins.task.message.blogger.retry:3}", autoRefreshed = true)
    int retryBloggerTimes;


    /**
     * 从推荐流识别的播主转移到bloggerMain的粉丝数量条件
     */
    @NacosValue(value="${ins.task.blogger.sysCollect.followerCount:100000}", autoRefreshed = true)
    int sysCollectFollowerCount;

    /**
     * 评论、帖子、播主采集更新后，24小时内不再更新,单位小时
     */
    @NacosValue(value="${ins.task.common.sysCollect.intervals:24}", autoRefreshed = true)
    int intervalHours;

    /**
     * 统计后不统计,单位小时
     */
    @NacosValue(value="${ins.task.common.st.intervals:24}", autoRefreshed = true)
    int stIntervalHours;

    /**
     * 帖子采集更新后,一定时间内不再采集 单位天
     */
    @NacosValue(value="${ins.task.insMediaCl.intervals.day:2}", autoRefreshed = true)
    int insMediaIntervalDay;

    /**
     * 评论采集更新后,一定时间内不再采集 单位天
     */
    @NacosValue(value="${ins.task.insCommentCl.intervals.day:3}", autoRefreshed = true)
    int insCommentIntervalDay;

    /**
     * 粉丝采集更新后,一定时间内不再采集 单位天
     */
    @NacosValue(value="${ins.task.insBloggerFollowerCl.intervals.day:7}", autoRefreshed = true)
    int insBloggerFollowerIntervalDay;

    /**
     * 需要进行采集、分析、打点任务的大博主最小粉丝数
     */
    @NacosValue(value="${ins.task.common.insBloggerMain.follower.count.min:500000}", autoRefreshed = true)
    int insBloggerMainFollowerCountMin;

    /**
     * 打点消息重发次数
     */
    @NacosValue(value="${ins.task.message.insBloggerMarkDay.retry:3}", autoRefreshed = true)
    int insBloggerMarkDayRetryTimes;

    /**
     * 采集帖子重发次数
     */
    @NacosValue(value="${ins.task.message.insMedia.retry:3}", autoRefreshed = true)
    int insMediaRetryTimes;

    /**
     * 采集评论重发次数
     */
    @NacosValue(value="${ins.task.message.insComment.retry:3}", autoRefreshed = true)
    int insCommentRetryTimes;

    /**
     * 采集粉丝重发次数
     */
    @NacosValue(value="${ins.task.message.insBloggerFollower.retry:3}", autoRefreshed = true)
    int insBloggerFollowerRetryTimes;

    /**
     * 采集关注者重发次数
     */
    @NacosValue(value="${ins.task.message.insBloggerFollowing.retry:3}", autoRefreshed = true)
    int insBloggerFollowingRetryTimes;

    /**
     * 采集地理位置重发次数
     */
    @NacosValue(value="${ins.task.message.insLocation.retry:3}", autoRefreshed = true)
    int insLocationRetryTimes;

    /**
     * 识别广告帖子重发次数
     */
    @NacosValue(value="${ins.task.message.insAdMedia.retry:3}", autoRefreshed = true)
    int insAdMediaRetryTimes;

    /**
     * 分析头像重发次数
     */
    @NacosValue(value="${ins.task.message.insAnalysisAvatar.retry:3}", autoRefreshed = true)
    int insAnalysisAvatarRetryTimes;

    /**
     * 分析语言重发次数
     */
    @NacosValue(value="${ins.task.message.insAnalysisLanguage.retry:3}", autoRefreshed = true)
    int insAnalysisLanguageRetryTimes;

    /**
     * 分析国家重发次数
     */
    @NacosValue(value="${ins.task.message.insAnalysisNation.retry:3}", autoRefreshed = true)
    int insAnalysisNationRetryTimes;

    /**
     * 分析收入重发次数
     */
    @NacosValue(value="${ins.task.message.insAnalysisIncome.retry:3}", autoRefreshed = true)
    int insAnalysisIncomeRetryTimes;

    /**
     * 分析分类重发次数
     */
    @NacosValue(value="${ins.task.message.insAnalysisCategory.retry:3}", autoRefreshed = true)
    int insAnalysisCategoryRetryTimes;

    /**
     * 分析账户异常重发次数
     */
    @NacosValue(value="${ins.task.message.insAnalysisAccountCheckUnusual.retry:3}", autoRefreshed = true)
    int insAnalysisAccountCheckUnusualRetryTimes;

    /**
     * 大博主打点每页查询id数
     */
    @NacosValue(value="${ins.task.insBloggerMarkDay.page.size:1000}", autoRefreshed = true)
    int insBloggerMarkDayPageSize;

    /**
     * insMarkDay kafka topic
     */
    @Value(value="${kafka.topics.insMarkDay.online}")
    String insMarkDayOnlineTopic;

    /**
     * insMedia kafka topic
     */
    @Value(value="${kafka.topics.insMedia.online}")
    String insMediaOnlineTopic;

    /**
     * insCommentCollect kafka topic
     */
    @Value(value="${kafka.topics.insCommentCollect.online}")
    String insCommentOnlineTopic;

    /**
     * insBloggerFollowing kafka topic
     */
    @Value(value="${kafka.topics.insBloggerFollowing.online}")
    String insBloggerFollowingOnlineTopic;

    /**
     * insBloggerFollower kafka topic
     */
    @Value(value="${kafka.topics.insBloggerFollower.online}")
    String insBloggerFollowerOnlineTopic;

    /**
     * insAdMediaIdentify kafka topic
     */
    @Value(value="${kafka.topics.insAdMediaIdentify.online}")
    String insAdMediaIdentifyOnlineTopic;

    /**
     * insBloggerLocation kafka topic
     */
    @Value(value="${kafka.topics.insBloggerLocation.online}")
    String insBloggerLocationOnlineTopic;

    /**
     * insAnalysisAvatar kafka topic
     */
    @Value(value="${kafka.topics.insAnalysisAvatar.online}")
    String insAnalysisAvatarOnlineTopic;

    /**
     * insAnalysisLocation kafka topic
     */
    @Value(value="${kafka.topics.insAnalysisLocation.online}")
    String insAnalysisLocationOnlineTopic;

    /**
     * insAnalysisLanguage kafka topic
     */
    @Value(value="${kafka.topics.insAnalysisLanguage.online}")
    String insAnalysisLanguageOnlineTopic;

    /**
     * insAnalysisIncome kafka topic
     */
    @Value(value="${kafka.topics.insAnalysisIncome.online}")
    String insAnalysisIncomeOnlineTopic;

    /**
     * insMBloggerRealFollowerEs kafka topic
     */
    @Value(value="${kafka.topics.insMBloggerRealFollowerEs.online}")
    String insMBloggerRealFollowerEsOnlineTopic;

    /**
     * insProductBaseStOnlineTopic kafka topic
     */
    @Value(value="${kafka.topics.insProductBaseSt.online}")
    String insProductBaseStOnlineTopic;

    /**
     * insAnalysisCategoryOnlineTopic kafka topic
     */
    @Value(value="${kafka.topics.insAnalysisCategory.online}")
    String insAnalysisCategoryOnlineTopic;

    /**
     * insAnalysisAccountCheckUnusual kafka topic
     */
    @Value(value="${kafka.topics.insAnalysisAccountCheckUnusual.online}")
    String insAnalysisAccountCheckUnusualOnlineTopic;

    /**
     * ins InsStBloggerCfs follower size limit id
     */
    @NacosValue(value="${ins.task.insStBloggerCfs.follower.size.id.limit:701}", autoRefreshed = true)
    int insStBloggerCfsFollowerSizeIdLimit;

    /**
     * 大博主打点 时区
     */
    @NacosValue(value="${ins.task.insBloggerMarkDay.timeZone:GMT+8}", autoRefreshed = true)
    String insBloggerMarkDaytimeZone;

    /**
     * 活跃粉丝关注采集时的最小关注数
     */
    @NacosValue(value="${ins.task.insBloggerFollowingCl.min.count:0}", autoRefreshed = true)
    int insBloggerFollowingClMinCount;

    /**
     * 帖子采集时的最小关帖子数
     */
    @NacosValue(value="${ins.task.insMediaCl.min.count:0}", autoRefreshed = true)
    int insMediaMinCount;

    /**
     * 帖子采集时的最小关帖子数
     */
    @NacosValue(value="${ins.task.insEsRefreshRealFollower.need:0}", autoRefreshed = true)
    int insEsRefreshRealFollowerNeed;

    /**
     * 最近提及商品的帖子时间区间
     */
    @NacosValue(value="${ins.task.insProduct.last.tag.limit.day:7}", autoRefreshed = true)
    int insProductLastTagLimitDay;

    /**
     * ins商品热度月榜个数
     */
    @NacosValue(value="${ins.task.insRkProductMonth.rank.count:500}", autoRefreshed = true)
    int insRkProductMonthRankCount;

    /**
     * ins商品热度周榜个数
     */
    @NacosValue(value="${ins.task.insRkProductWeek.rank.count:500}", autoRefreshed = true)
    int insRkProductWeekRankCount;

    /**
     * 大博主ai分类分析后,一定时间内不再采集 单位小时
     */
    @NacosValue(value="${ins.task.insAnalysisCategory.intervals.hour:48}", autoRefreshed = true)
    int insAnalysisCategoryIntervalsHour;


    /**
     * 账户异常发送消息的次数
     */
    @NacosValue(value="${ins.task.insAnalysisAccountCheckUnusual.sendMsg.count:3}", autoRefreshed = true)
    int insAnalysisAccountCheckUnusualSendMsgCount;

    /**
     * 中播主 帖子、播主采集更新后，一周内不再更新,单位天
     */
    @NacosValue(value="${ins.task.common.insMiddleBlogger.intervals.day:7}", autoRefreshed = true)
    int insMiddleBloggerIntervalDay;

    /**
     * insMidBloggerUpdate kafka topic
     */
    @Value(value="${kafka.topics.insMiddleBloggerUpdate.online}")
    String insMiddleBloggerUpdateOnlineTopic;

    /**
     * insMiddleBloggerMedia kafka topic
     */
    @Value(value="${kafka.topics.insMiddleBloggerMedia.online}")
    String insMiddleBloggerMediaOnlineTopic;

    /**
     * insAnalysisBrand kafka topic
     */
    @Value(value="${kafka.topics.insAnalysisBrand.online}")
    String insAnalysisBrandOnlineTopic;

    /**
     * insAnalysisBrand 异常重发次数
     */
    @NacosValue(value="${ins.task.message.insAnalysisBrand.retry:3}", autoRefreshed = true)
    int insAnalysisBrandRetryTimes;

    /**
     * 播主品牌分析后 不再更新,单位天
     */
    @NacosValue(value="${ins.task.common.insAnalysisBrand.intervals.day:30}", autoRefreshed = true)
    int insAnalysisBrandIntervalDay;

    /**
     * 品牌分类分析后,不再更新,单位天
     */
    @NacosValue(value="${ins.task.common.insAnalysisBrandCategory.intervals.day:1}", autoRefreshed = true)
    int insAnalysisBrandCategoryIntervalDay;

    /**
     * insAnalysisBrandCategory kafka topic
     */
    @Value(value="${kafka.topics.insAnalysisBrandCategory.online}")
    String insAnalysisBrandCategoryOnlineTopic;

    /**
     * insAnalysisBrandCategory 异常重发次数
     */
    @NacosValue(value="${ins.task.message.insAnalysisBrandCategory.retry:3}", autoRefreshed = true)
    int insAnalysisBrandCategoryRetryTimes;

    /**
     * insMarkBrand kafka topic
     */
    @Value(value="${kafka.topics.insMarkBrand.online}")
    String insMarkBrandOnlineTopic;

    /**
     * insMarkBrand 重发次数
     */
    @NacosValue(value="${ins.task.message.insMarkBrandRetryTimes.retry:3}", autoRefreshed = true)
    int insMarkBrandRetryTimes;

    /**
     * ins品牌热度月榜个数
     */
    @NacosValue(value="${ins.task.insRkBrand.rank.count:100}", autoRefreshed = true)
    int insRkBrandRankCount;


    /**
     * 品牌的索引
     */
    @NacosValue(value = "${ins.es.brand.index:ins_brand}", autoRefreshed = true)
    String insBrandIndex;

    /**
     * insMonitorOnlineTopic kafka topic
     */
    @Value(value="${kafka.topics.insMonitor.online}")
    String insMonitorOnlineTopic;

    /**
     *
     */
    @Value(value="${kafka.consumer.servers}")
    private String kafkaAdminClientServers;

    /**
     *
     */
    @NacosValue(value="${kafka.adminClient.connections.max.idle.ms}", autoRefreshed = true)
    private int kafkaAdminClientConnectionsIdle;

    /**
     *
     */
    @NacosValue(value="${kafka.adminClient.request.timeout.ms}", autoRefreshed = true)
    private int kafkaAdminClientRequestTimeout;

    /**
     * 检测 kafka 队列消息积压的阈值
     */
    @NacosValue(value="${ins.task.monitor.kafka.lag.count:10000}", autoRefreshed = true)
    int insMonitorKafkaLagCount;

    /**
     * insAnalysisProductCategory kafka topic
     */
    @Value(value="${kafka.topics.insAnalysisProductCategory.online}")
    String insAnalysisProductCategoryOnlineTopic;

    /**
     * insAnalysisProductCategory 重发次数
     */
    @NacosValue(value="${ins.task.message.insAnalysisProductCategoryRetryTimes.retry:3}", autoRefreshed = true)
    int insAnalysisProductCategoryRetryTimes;

    /**
     * 品牌分类分析后,不再更新,单位天
     */
    @NacosValue(value="${ins.task.insAnalysisProductCategory.intervals.day:4}", autoRefreshed = true)
    int insAnalysisProductCategoryIntervalDay;

    /**
     * in带货播主排行榜个数
     */
    @NacosValue(value="${ins.task.insRkBloggerBgs.rank.count:500}", autoRefreshed = true)
    int insRkBloggerBgsRankCount;

    /**
     * 带货博主打点每页查询id数
     */
    @NacosValue(value="${ins.task.insBloggerBgsMarkDay.page.size:10000}", autoRefreshed = true)
    int insBloggerBgsMarkDayPageSize;
}
